home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / examples / template / README.z / README
Encoding:
Text File  |  2003-11-18  |  4.6 KB  |  118 lines

  1. The Template Application
  2. ------------------------
  3. This is a template Dt application. It illustrates how to write
  4. a simple application integrated with the Dt desktop.
  5.  
  6. The application provides a simple airbrush drawing facility using
  7. Motif. It defines a new file type '*.template' which contains a list
  8. of x, y coordinates for the drawn points. The application and data
  9. format favor simplicity over performance, and could obviously
  10. be improved.
  11.  
  12. Actions
  13. -------
  14. A set of actions are provided to allow integration into the Dt desktop:
  15.  
  16.     TemplateNew (labeled New) - to create a new Template data file.
  17.     TemplateOpen (labeled Open) - to open an existing Template data file.
  18.     TemplatePrint (labeled Print) - to Print a Template data file.
  19.  
  20. Datatypes
  21. ---------
  22. The template data file is described by the datatype TemplateData, defined
  23. in C/template.dt
  24.  
  25. Icons
  26. -----
  27. A minimal set of icons are provided to integrate with the Dt desktop. The
  28. application group icons, window manager icon, Action icons and data file
  29. icons are identical. In a more sophisticated application, these would
  30. most likely be similar, but visually differentiated in some way.
  31.  
  32. Help
  33. ----
  34. A simple help file is provided. This can be displayed from within the
  35. application using the Help viewer widget (by selecting 'Overview' in the
  36. 'Help' menu. It can also be view using the dthelpview tool.
  37.  
  38. Message Catalog
  39. ---------------
  40. All user-visible text in the application is loaded from the message catalog
  41. template.cat.
  42.  
  43. Example file
  44. ------------
  45. As recommended in the Programmer's Guide, an example.template file is
  46. provided.
  47.  
  48. App-defaults file
  49. -----------------
  50. The app-defaults file 'Template' contains resources to set the initial
  51. size of the application window.
  52.  
  53. The Application Package
  54. -----------------------
  55. The Makefile provided will build the application binary ("templatebin") and
  56. associated files. It then copies these into the newly created application
  57. package directory hierarchy ("template"). The ./dt/ subdirectory hierarchy
  58. is a Dt standard and is described in the Programmer's Guide. The other
  59. directories (bin, app-defaults, msg) are not standard directories and may
  60. vary for your application and installation script.
  61.  
  62. The binary templatebin will function on its own, however to fully install
  63. the application and integrate with the Dt desktop you will need to write a
  64. platform-specific installation script.  The installation script will
  65. typically need to be run with root privileges.
  66.  
  67. This script should be written to ensure that the binary, app-defaults and
  68. message catalog get installed correctly on your target system, and are
  69. available in the appropriate user or system search paths.
  70.  
  71. This script should also install the ToolTalk ptype into the system by
  72. running the command 'tt_type_comp -d system template.ptype'.
  73.  
  74.     NOTE: There is a bug in the system that may prevent tt_type_comp from
  75.     notifying an existing desktop session that new types have been added.
  76.     The symptom of this bug will be that the application will fail with the
  77.     following error message:
  78.  
  79.     templatebin: ttmedia_ptype_declare failed
  80.  
  81.     If this occurs, a workaround is to send SIGUSR2 to the running ttsession
  82.     process, like so:
  83.  
  84.     $ /usr/bin/ps -e | grep ttsess
  85.       7850 console  0:08 ttsessio
  86.     $ kill -USR2 7850
  87.  
  88.     This will cause ttsession to reread its types files.  See ttsession(1)
  89.     for further information.  An alternative workaround is to logout from
  90.     the desktop and restart.
  91. If you choose to test the templatebin binary before integrating it with
  92. the Dt desktop, you will need to set the following (this assumes you
  93. have built out of /usr/dt/examples/template):
  94.  
  95.   export XMICONBMSEARCHPATH=$XMICONBMSEARCHPATH:/usr/dt/examples/template/template/dt/appconfig/icons/C/%B:
  96.  
  97.   export XMICONSEARCHPATH=$XMICONSEARCHPATH:/usr/dt/examples/template/template/dt/appconfig/icons/C/%B:
  98.  
  99.   export DTHELPSEARCHPATH=$DTHELPSEARCHPATH:/usr/dt/examples/template/template/dt/appconfig/help/C/%H.sdl:
  100.  
  101. The installation script should be written to ensure that the bin, app-defaults
  102. and message catalog get installed correctly on your target system, and
  103.  
  104. The final step of the installation script should be to execute
  105. 'dtappintegrate -s template'.  This will ensure that the desktop
  106. files under the ./dt/ subdirectory are installed correctly and
  107. inserted into the appropriate Dt system and user paths.
  108.  
  109. Localization
  110. ------------
  111. The application is ready for localization. This directory contains
  112. the non-localizable portions of the application.
  113.  
  114. The ./C/ directory contains the localizable portions of the application
  115. in US English. Some or all of these files should be translated and
  116. placed in a separate locale-specific directory.
  117.  
  118.